home *** CD-ROM | disk | FTP | other *** search
/ SIGGRAPH 2002 Course Notes / SIGGRAPH 2002 - Course Notes - Disc 1.iso / pc / notes / 18 / supplemental_material / SVG_Ex / events / mouseover.svg next >
Encoding:
Extensible Markup Language  |  2001-12-06  |  961 b   |  25 lines

  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
  3.      "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
  4. <svg xmlns="http://www.w3.org/2000/svg">
  5.   <script type="text/ecmascript"> <![CDATA[ 
  6.       function text_on(evt,which) { 
  7.          title = evt.target.ownerDocument.getElementById(which);
  8.          title.setAttribute("visibility", "visible");
  9.       } 
  10.    ]]> </script> 
  11.   <script type="text/ecmascript"> <![CDATA[ 
  12.       function text_off(evt,which) { 
  13.          title = evt.target.ownerDocument.getElementById(which);
  14.          title.setAttribute("visibility", "hidden");
  15.       } 
  16.    ]]> </script> 
  17.  
  18.   <text onmouseover="text_on(evt,'hints')" onmouseout="text_off(evt,'hints')" x="75px" y="50px">MouseOverMe</text>
  19.   <g id="hints" visibility="hidden">
  20.     <text x="175px" y="20px" >On mouse over, </text>
  21.     <text x="175px" y="40px">this text becomes visible </text>
  22.   </g>
  23.  
  24. </svg>
  25.